The present invention relates to a semiconductor device and a method of writing data to a semiconductor device and, more particularly, to a semiconductor device holding confidential information to be kept secret from an attack from the outside and a method of writing confidential information to the semiconductor device.
In recent years, many security techniques using encryption technology for improvement in resistance to an unauthorized access to a semiconductor device or prevention of imitation are proposed. In the encryption technology, an encryption key is used. The technique, however, has a problem that when an encryption key is obtained by an attacker, an illegal access to a semiconductor device becomes possible. Consequently, information which is inconvenient when leaked such as key information is demanded to be prevented from being leaked as confidential information to the outside. Patent documents 1 to 4 disclose techniques of security measures on key information as one of confidential information. In all of the techniques of Patent documents 1 to 4, confidential information such as key information is generated by using an eigenvalue which differs according to manufacture variations of semiconductor devices such as a silicon ID or a PUF (Physically Unclonable Function). In Patent documents 1 to 4, since such an eigenvalue includes an error, in the case of generating definitive confidential information by using such an eigenvalue, error correcting process has to be performed on the eigenvalue. By generating confidential information on the basis of such an eigenvalue, it becomes unnecessary to hold the confidential information as a fixed value, the security of the semiconductor device can be improved.